home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01b.txt
/
000081_icon-group-sender_Tue Jul 3 13:50:57 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f63KosM05505
for icon-group-addresses; Tue, 3 Jul 2001 13:50:54 -0700 (MST)
Message-Id: <200107032050.f63KosM05505@baskerville.CS.Arizona.EDU>
Date: Tue, 03 Jul 2001 21:10:32 +1000
From: Kim Bastin <kim@mel.comcen.com.au>
X-Accept-Language: en,pl,cs
X-Newsgroups: comp.lang.icon
Subject: Re: Why is this an invalid expression????
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1064
Maria Koutsikou wrote:
>
> I was typing out the following procedure, to call in the main procedure,
> but when I compiled it, I got an error message saying : "end" : invalid
> expression (indicating the line where the following procedure ends).
> Since when is an "end" at the end of a procedure an invalid expression?
> Can anyone tell me what I'm doing wrong?
>
> procedure ivs(j, k, m)
>
> numbers := [1, 2, 3, 4, 5, -3, -15]
> lista := []
> listb := []
> listc := []
> listd := []
> inv := []
> n := (*numbers)
> i := 1
> every i := 1 to j-1 do {
> temp := write(numbers[i])
> put(lista,temp)
> i +:= 1
> every write(!lista)
> {
^
The problem is here. You meant to type "}". The usual cause of an error
with "end" is unbalanced brackets.
(I haven't inspected the rest of the code, so I don't know if there are any
other problems.)
Kim Bastin